<#-- 全局变量 -->
<#global ctx ="${ctp.contextPath!''}">

<#macro pageFooter>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="${config.getValue('page.pageSize')}" selected="selected">${config.getValue('page.pageSize')}</option>
                <option value="20">20</option>
                <option value="40">40</option>
            </select>
        </div>
        <span>&nbsp;条，共 ${pageInfo.total} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="${pageInfo.total}" data-page-size="${pageInfo.pageSize}" data-page-current="${pageInfo.pageNum}">
    </div>
</div>
</#macro>

<#macro miniPageFooter>
<div class="bjui-pageFooter">
   
    <div class="pagination-box" data-toggle="pagination" data-total="${pageInfo.total}" data-page-size="${pageInfo.pageSize}" data-page-current="${pageInfo.pageNum}">
    </div>
</div>
</#macro>

<#macro select list=[] defaultOptions={} optionName="name" optionValue="id" value="" extra...>
	<select data-toggle="selectpicker" <#if extra?size!=0><#assign x = extra.extra!extra><#list x?keys as a>${a}="${x[a]?html}"<#if a_has_next></#if></#list></#if>>
		<#list defaultOptions?keys as key>
			<#if key==value>
			<option value="${key}" selected="selected">${defaultOptions[key]}</option>
			<#else>
			<option value="${key}">${defaultOptions[key]}</option>
			</#if>
		</#list>
		<#if list?is_enumerable>
		    <#list list as item>
		        <#if item?is_hash>
		        <#local option_Value = item[optionValue]!item/> <#--页面的1,2，3 没有经过包装，所以${3["a"]怎么写都会报错}-->
		        <#local option_Name = item[optionName]!item/>
		        <#else>
		        <#local option_Value = item/>
		        <#local option_Name = item/>
		        </#if>
		        <#if (option_Value?string)==value>
		        <option value="${option_Value}" selected="selected">${option_Name}</option>
		        <#else>
		        <option value="${option_Value}">${option_Name}</option>
		        </#if>
		    </#list>
		 <#elseif list?is_hash_ex>
		    <#list list?values as item>
		        <#local option_Name = item/>
		        <#local option_Value = list?keys[item_index]/>
		        <#if (option_Value?string)==value>
		        <option value="${option_Value}" selected="selected">${option_Name}</option>
		        <#else>
		        <option value="${option_Value}">${option_Name}</option>
		        </#if>
		    </#list>
		</#if>
		<#nested>
	</select>
</#macro>




















